/*
 * Copyright (C) 2022-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#define LOG_TAG "NFCTAG_SVC_ADAPTER"
#include "nfc_tag_hdi_adapter.h"
#include <mutex>
#include "nfc_tag_log.h"
#include "nfc_tag_errcode.h"
#include "nfc_tag_hdi_impl.h"

namespace OHOS {
namespace NFC {

ErrCode NfcTagHdiAdapter::Init()
{
    return NfcTagHdiImpl::GetInstance().Init();
}
ErrCode NfcTagHdiAdapter::Uninit()
{
    return NfcTagHdiImpl::GetInstance().Uninit();
}
ErrCode NfcTagHdiAdapter::ReadNdefTag(std::string &data)
{
    return NfcTagHdiImpl::GetInstance().ReadNdefTag(data);
}
ErrCode NfcTagHdiAdapter::WriteNdefTag(const std::string &data)
{
    return NfcTagHdiImpl::GetInstance().WriteNdefTag(data);
}

ErrCode NfcTagHdiAdapter::ReadNdefData(std::vector<uint8_t> &data)
{
    return NfcTagHdiImpl::GetInstance().ReadNdefData(data);
}

ErrCode NfcTagHdiAdapter::WriteNdefData(const std::vector<uint8_t> &data)
{
    return NfcTagHdiImpl::GetInstance().WriteNdefData(data);
}

ErrCode NfcTagHdiAdapter::RegisterCallBack(sptr<INfcTagCallback> listener)
{
    return NfcTagHdiImpl::GetInstance().RegisterCallBack(listener);
}

ErrCode NfcTagHdiAdapter::UnRegisterCallBack(sptr<INfcTagCallback> listener)
{
    return NfcTagHdiImpl::GetInstance().UnRegisterCallBack(listener);
}

ErrCode NfcTagHdiAdapter::InitDriver()
{
    return NfcTagHdiImpl::GetInstance().InitDriver();
}

}  // namespace NFC
}  // namespace OHOS
